FROM centos:7
MAINTAINER tyn <tanye.tyn@alibaba-inc.com>
# 安装打包必备软件
RUN yum install -y wget unzip telnet lsof net-tools bind-utils

# 准备 JDK/Tomcat 系统变量
ENV JAVA_HOME /usr/lib/jvm/java
ENV PATH $PATH:$JAVA_HOME/bin
ENV CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
ENV ADMIN_HOME /home/admin
# 下载安装 OpenJDK
RUN yum -y install java-1.8.0-openjdk-devel
RUN mkdir -p /home/admin/app/ && mkdir -p /home/admin/app/logs
# 拷贝jar，修改成自己项目的jar包，路径相对根目录
ARG JAR_LOCAL_PATH=flow-platform-boot/target/flowplatform-backend.jar
COPY ${JAR_LOCAL_PATH}  /home/admin/app/flowplatform-backend.jar
# 增加容器内中⽂支持
ENV LANG="en_US.UTF-8"
# 增强 Webshell 使⽤体验
ENV TERM=xterm

# doom上传
# ARG COMMON_FILE=sdk_3.5.10/sdk/clouddoom-loader.jar
# COPY ${COMMON_FILE} /home/admin/doom/clouddoom-loader.jar
#-javaagent:/home/admin/doom/clouddoom-loader.jar=appId:1219#clientKey:DKA3UkEStY0B8osS#endPoint:https://doom.rdc.aliyun.com

# 将启动命令写入启动脚本 start.sh
# RUN mkdir -p /home/admin
# RUN echo 'java -jar $CATALINA_OPTS /home/admin/app/flowplatform-backend.jar'> /home/admin/start.sh && chmod +x /home/admin/start.sh
RUN echo 'echo  47.92.83.221 foura-be-dayuboot-daily.ingress.dayu.work >> /etc/hosts' >> /home/admin/start.sh
# WORKDIR $ADMIN_HOME
# CMD ["/bin/bash", "/home/admin/start.sh"]

EXPOSE 6379 3306


